<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621679531980"><span id="local-6989586621679531981"><span id="local-6989586621679531982"></span></span></span><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DeriveGeneric, NoImplicitPrelude, MagicHash,
             ExistentialQuantification, ImplicitParams #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# OPTIONS_GHC -funbox-strict-fields #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# OPTIONS_HADDOCK not-home #-}</span><span>
</span><span id="line-6"></span><span>
</span><span id="line-7"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Module      :  GHC.IO.Exception</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow, 2009</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- License     :  see libraries/base/LICENSE</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Stability   :  internal</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Portability :  non-portable</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- IO-related Exception types and functions</span><span>
</span><span id="line-18"></span><span class="hs-comment">--</span><span>
</span><span id="line-19"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.IO.Exception</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-22"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#BlockedIndefinitelyOnMVar"><span class="hs-identifier">BlockedIndefinitelyOnMVar</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#blockedIndefinitelyOnMVar"><span class="hs-identifier">blockedIndefinitelyOnMVar</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#BlockedIndefinitelyOnSTM"><span class="hs-identifier">BlockedIndefinitelyOnSTM</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#blockedIndefinitelyOnSTM"><span class="hs-identifier">blockedIndefinitelyOnSTM</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#Deadlock"><span class="hs-identifier">Deadlock</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#AllocationLimitExceeded"><span class="hs-identifier">AllocationLimitExceeded</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#allocationLimitExceeded"><span class="hs-identifier">allocationLimitExceeded</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#AssertionFailed"><span class="hs-identifier">AssertionFailed</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#CompactionFailed"><span class="hs-identifier">CompactionFailed</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#cannotCompactFunction"><span class="hs-identifier">cannotCompactFunction</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#cannotCompactPinned"><span class="hs-identifier">cannotCompactPinned</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#cannotCompactMutable"><span class="hs-identifier">cannotCompactMutable</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#SomeAsyncException"><span class="hs-identifier">SomeAsyncException</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#asyncExceptionToException"><span class="hs-identifier">asyncExceptionToException</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#asyncExceptionFromException"><span class="hs-identifier">asyncExceptionFromException</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#AsyncException"><span class="hs-identifier">AsyncException</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#stackOverflow"><span class="hs-identifier">stackOverflow</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#heapOverflow"><span class="hs-identifier">heapOverflow</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#ArrayException"><span class="hs-identifier">ArrayException</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#ExitCode"><span class="hs-identifier">ExitCode</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#FixIOException"><span class="hs-identifier">FixIOException</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#ioException"><span class="hs-identifier">ioException</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#ioError"><span class="hs-identifier">ioError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier">IOError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#IOException"><span class="hs-identifier">IOException</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier">IOErrorType</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#userError"><span class="hs-identifier">userError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#assertError"><span class="hs-identifier">assertError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-45"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#unsupportedOperation"><span class="hs-identifier">unsupportedOperation</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>  </span><span class="annot"><a href="GHC.IO.Exception.html#untangle"><span class="hs-identifier">untangle</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Generics.html"><span class="hs-identifier">GHC.Generics</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.List.html"><span class="hs-identifier">GHC.List</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.IO.html"><span class="hs-identifier">GHC.IO</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Show.html"><span class="hs-identifier">GHC.Show</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Read.html"><span class="hs-identifier">GHC.Read</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Exception.html"><span class="hs-identifier">GHC.Exception</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.IO.Handle.Types.html"><span class="hs-identifier">GHC.IO.Handle.Types</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.OldList.html"><span class="hs-identifier">GHC.OldList</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Data.OldList.html#intercalate"><span class="hs-identifier">intercalate</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.Stack.CCS.html"><span class="hs-identifier">GHC.Stack.CCS</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Foreign.C.Types.html"><span class="hs-identifier">Foreign.C.Types</span></a></span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Typeable.html"><span class="hs-identifier">Data.Typeable</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Data.Typeable.html#cast"><span class="hs-identifier">cast</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span class="hs-comment">-- ------------------------------------------------------------------------</span><span>
</span><span id="line-64"></span><span class="hs-comment">-- Exception datatypes and operations</span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span class="hs-comment">-- |The thread is blocked on an @MVar@, but there are no other references</span><span>
</span><span id="line-67"></span><span class="hs-comment">-- to the @MVar@ so it can't ever continue.</span><span>
</span><span id="line-68"></span><span class="hs-keyword">data</span><span> </span><span id="BlockedIndefinitelyOnMVar"><span class="annot"><a href="GHC.IO.Exception.html#BlockedIndefinitelyOnMVar"><span class="hs-identifier hs-var">BlockedIndefinitelyOnMVar</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="BlockedIndefinitelyOnMVar"><span class="annot"><a href="GHC.IO.Exception.html#BlockedIndefinitelyOnMVar"><span class="hs-identifier hs-var">BlockedIndefinitelyOnMVar</span></a></span></span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-71"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531943"><span id="local-6989586621679531945"><span id="local-6989586621679531947"><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#BlockedIndefinitelyOnMVar"><span class="hs-identifier hs-type">BlockedIndefinitelyOnMVar</span></a></span></span></span></span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-74"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531937"><span id="local-6989586621679531939"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#BlockedIndefinitelyOnMVar"><span class="hs-identifier hs-type">BlockedIndefinitelyOnMVar</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-75"></span><span>    </span><span id="local-6989586621679531935"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; BlockedIndefinitelyOnMVar -&gt; ShowS
</span><a href="GHC.Show.html#showsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">BlockedIndefinitelyOnMVar
</span><a href="GHC.IO.Exception.html#BlockedIndefinitelyOnMVar"><span class="hs-identifier hs-var">BlockedIndefinitelyOnMVar</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;thread blocked indefinitely in an MVar operation&quot;</span></span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span class="annot"><a href="GHC.IO.Exception.html#blockedIndefinitelyOnMVar"><span class="hs-identifier hs-type">blockedIndefinitelyOnMVar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span><span> </span><span class="hs-comment">-- for the RTS</span><span>
</span><span id="line-78"></span><span id="blockedIndefinitelyOnMVar"><span class="annot"><span class="annottext">blockedIndefinitelyOnMVar :: SomeException
</span><a href="GHC.IO.Exception.html#blockedIndefinitelyOnMVar"><span class="hs-identifier hs-var hs-var">blockedIndefinitelyOnMVar</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BlockedIndefinitelyOnMVar -&gt; SomeException
forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="GHC.Exception.Type.html#toException"><span class="hs-identifier hs-var">toException</span></a></span><span> </span><span class="annot"><span class="annottext">BlockedIndefinitelyOnMVar
</span><a href="GHC.IO.Exception.html#BlockedIndefinitelyOnMVar"><span class="hs-identifier hs-var">BlockedIndefinitelyOnMVar</span></a></span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span class="hs-comment">-----</span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-comment">-- |The thread is waiting to retry an STM transaction, but there are no</span><span>
</span><span id="line-83"></span><span class="hs-comment">-- other references to any @TVar@s involved, so it can't ever continue.</span><span>
</span><span id="line-84"></span><span class="hs-keyword">data</span><span> </span><span id="BlockedIndefinitelyOnSTM"><span class="annot"><a href="GHC.IO.Exception.html#BlockedIndefinitelyOnSTM"><span class="hs-identifier hs-var">BlockedIndefinitelyOnSTM</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="BlockedIndefinitelyOnSTM"><span class="annot"><a href="GHC.IO.Exception.html#BlockedIndefinitelyOnSTM"><span class="hs-identifier hs-var">BlockedIndefinitelyOnSTM</span></a></span></span><span>
</span><span id="line-85"></span><span>
</span><span id="line-86"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-87"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531921"><span id="local-6989586621679531923"><span id="local-6989586621679531925"><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#BlockedIndefinitelyOnSTM"><span class="hs-identifier hs-type">BlockedIndefinitelyOnSTM</span></a></span></span></span></span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-90"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531916"><span id="local-6989586621679531918"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#BlockedIndefinitelyOnSTM"><span class="hs-identifier hs-type">BlockedIndefinitelyOnSTM</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-91"></span><span>    </span><span id="local-6989586621679531915"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; BlockedIndefinitelyOnSTM -&gt; ShowS
</span><a href="#local-6989586621679531915"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">BlockedIndefinitelyOnSTM
</span><a href="GHC.IO.Exception.html#BlockedIndefinitelyOnSTM"><span class="hs-identifier hs-var">BlockedIndefinitelyOnSTM</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;thread blocked indefinitely in an STM transaction&quot;</span></span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="annot"><a href="GHC.IO.Exception.html#blockedIndefinitelyOnSTM"><span class="hs-identifier hs-type">blockedIndefinitelyOnSTM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span><span> </span><span class="hs-comment">-- for the RTS</span><span>
</span><span id="line-94"></span><span id="blockedIndefinitelyOnSTM"><span class="annot"><span class="annottext">blockedIndefinitelyOnSTM :: SomeException
</span><a href="GHC.IO.Exception.html#blockedIndefinitelyOnSTM"><span class="hs-identifier hs-var hs-var">blockedIndefinitelyOnSTM</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BlockedIndefinitelyOnSTM -&gt; SomeException
forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="GHC.Exception.Type.html#toException"><span class="hs-identifier hs-var">toException</span></a></span><span> </span><span class="annot"><span class="annottext">BlockedIndefinitelyOnSTM
</span><a href="GHC.IO.Exception.html#BlockedIndefinitelyOnSTM"><span class="hs-identifier hs-var">BlockedIndefinitelyOnSTM</span></a></span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="hs-comment">-----</span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span class="hs-comment">-- |There are no runnable threads, so the program is deadlocked.</span><span>
</span><span id="line-99"></span><span class="hs-comment">-- The @Deadlock@ exception is raised in the main thread only.</span><span>
</span><span id="line-100"></span><span class="hs-keyword">data</span><span> </span><span id="Deadlock"><span class="annot"><a href="GHC.IO.Exception.html#Deadlock"><span class="hs-identifier hs-var">Deadlock</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Deadlock"><span class="annot"><a href="GHC.IO.Exception.html#Deadlock"><span class="hs-identifier hs-var">Deadlock</span></a></span></span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-103"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531904"><span id="local-6989586621679531906"><span id="local-6989586621679531908"><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#Deadlock"><span class="hs-identifier hs-type">Deadlock</span></a></span></span></span></span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-106"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531899"><span id="local-6989586621679531901"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#Deadlock"><span class="hs-identifier hs-type">Deadlock</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-107"></span><span>    </span><span id="local-6989586621679531898"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; Deadlock -&gt; ShowS
</span><a href="#local-6989586621679531898"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Deadlock
</span><a href="GHC.IO.Exception.html#Deadlock"><span class="hs-identifier hs-var">Deadlock</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&lt;&lt;deadlock&gt;&gt;&quot;</span></span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span class="hs-comment">-----</span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span class="hs-comment">-- |This thread has exceeded its allocation limit.  See</span><span>
</span><span id="line-112"></span><span class="hs-comment">-- 'System.Mem.setAllocationCounter' and</span><span>
</span><span id="line-113"></span><span class="hs-comment">-- 'System.Mem.enableAllocationLimit'.</span><span>
</span><span id="line-114"></span><span class="hs-comment">--</span><span>
</span><span id="line-115"></span><span class="hs-comment">-- @since 4.8.0.0</span><span>
</span><span id="line-116"></span><span class="hs-keyword">data</span><span> </span><span id="AllocationLimitExceeded"><span class="annot"><a href="GHC.IO.Exception.html#AllocationLimitExceeded"><span class="hs-identifier hs-var">AllocationLimitExceeded</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="AllocationLimitExceeded"><span class="annot"><a href="GHC.IO.Exception.html#AllocationLimitExceeded"><span class="hs-identifier hs-var">AllocationLimitExceeded</span></a></span></span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-119"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531889"><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#AllocationLimitExceeded"><span class="hs-identifier hs-type">AllocationLimitExceeded</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-120"></span><span>  </span><span id="local-6989586621679531887"><span class="annot"><span class="annottext">toException :: AllocationLimitExceeded -&gt; SomeException
</span><a href="#local-6989586621679531887"><span class="hs-identifier hs-var hs-var hs-var hs-var">toException</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AllocationLimitExceeded -&gt; SomeException
forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="GHC.IO.Exception.html#asyncExceptionToException"><span class="hs-identifier hs-var">asyncExceptionToException</span></a></span><span>
</span><span id="line-121"></span><span>  </span><span id="local-6989586621679531885"><span class="annot"><span class="annottext">fromException :: SomeException -&gt; Maybe AllocationLimitExceeded
</span><a href="GHC.Exception.Type.html#fromException"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromException</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SomeException -&gt; Maybe AllocationLimitExceeded
forall e. Exception e =&gt; SomeException -&gt; Maybe e
</span><a href="GHC.IO.Exception.html#asyncExceptionFromException"><span class="hs-identifier hs-var">asyncExceptionFromException</span></a></span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span class="hs-comment">-- | @since 4.7.1.0</span><span>
</span><span id="line-124"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531879"><span id="local-6989586621679531881"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#AllocationLimitExceeded"><span class="hs-identifier hs-type">AllocationLimitExceeded</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-125"></span><span>    </span><span id="local-6989586621679531878"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; AllocationLimitExceeded -&gt; ShowS
</span><a href="#local-6989586621679531878"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">AllocationLimitExceeded
</span><a href="GHC.IO.Exception.html#AllocationLimitExceeded"><span class="hs-identifier hs-var">AllocationLimitExceeded</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-126"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;allocation limit exceeded&quot;</span></span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span class="annot"><a href="GHC.IO.Exception.html#allocationLimitExceeded"><span class="hs-identifier hs-type">allocationLimitExceeded</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span><span> </span><span class="hs-comment">-- for the RTS</span><span>
</span><span id="line-129"></span><span id="allocationLimitExceeded"><span class="annot"><span class="annottext">allocationLimitExceeded :: SomeException
</span><a href="GHC.IO.Exception.html#allocationLimitExceeded"><span class="hs-identifier hs-var hs-var">allocationLimitExceeded</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AllocationLimitExceeded -&gt; SomeException
forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="GHC.Exception.Type.html#toException"><span class="hs-identifier hs-var">toException</span></a></span><span> </span><span class="annot"><span class="annottext">AllocationLimitExceeded
</span><a href="GHC.IO.Exception.html#AllocationLimitExceeded"><span class="hs-identifier hs-var">AllocationLimitExceeded</span></a></span><span>
</span><span id="line-130"></span><span>
</span><span id="line-131"></span><span class="hs-comment">-----</span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span class="hs-comment">-- | Compaction found an object that cannot be compacted.  Functions</span><span>
</span><span id="line-134"></span><span class="hs-comment">-- cannot be compacted, nor can mutable objects or pinned objects.</span><span>
</span><span id="line-135"></span><span class="hs-comment">-- See 'GHC.Compact.compact'.</span><span>
</span><span id="line-136"></span><span class="hs-comment">--</span><span>
</span><span id="line-137"></span><span class="hs-comment">-- @since 4.10.0.0</span><span>
</span><span id="line-138"></span><span class="hs-keyword">newtype</span><span> </span><span id="CompactionFailed"><span class="annot"><a href="GHC.IO.Exception.html#CompactionFailed"><span class="hs-identifier hs-var">CompactionFailed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="CompactionFailed"><span class="annot"><a href="GHC.IO.Exception.html#CompactionFailed"><span class="hs-identifier hs-var">CompactionFailed</span></a></span></span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span class="hs-comment">-- | @since 4.10.0.0</span><span>
</span><span id="line-141"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531867"><span id="local-6989586621679531869"><span id="local-6989586621679531871"><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#CompactionFailed"><span class="hs-identifier hs-type">CompactionFailed</span></a></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-142"></span><span>
</span><span id="line-143"></span><span class="hs-comment">-- | @since 4.10.0.0</span><span>
</span><span id="line-144"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531862"><span id="local-6989586621679531864"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#CompactionFailed"><span class="hs-identifier hs-type">CompactionFailed</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-145"></span><span>    </span><span id="local-6989586621679531861"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; CompactionFailed -&gt; ShowS
</span><a href="#local-6989586621679531861"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Exception.html#CompactionFailed"><span class="hs-identifier hs-type">CompactionFailed</span></a></span><span> </span><span id="local-6989586621679531860"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531860"><span class="hs-identifier hs-var">why</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-146"></span><span>      </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;compaction failed: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531860"><span class="hs-identifier hs-var">why</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-147"></span><span>
</span><span id="line-148"></span><span class="annot"><a href="GHC.IO.Exception.html#cannotCompactFunction"><span class="hs-identifier hs-type">cannotCompactFunction</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span><span> </span><span class="hs-comment">-- for the RTS</span><span>
</span><span id="line-149"></span><span id="cannotCompactFunction"><span class="annot"><span class="annottext">cannotCompactFunction :: SomeException
</span><a href="GHC.IO.Exception.html#cannotCompactFunction"><span class="hs-identifier hs-var hs-var">cannotCompactFunction</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-150"></span><span>  </span><span class="annot"><span class="annottext">CompactionFailed -&gt; SomeException
forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="GHC.Exception.Type.html#toException"><span class="hs-identifier hs-var">toException</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; CompactionFailed
</span><a href="GHC.IO.Exception.html#CompactionFailed"><span class="hs-identifier hs-var">CompactionFailed</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cannot compact functions&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span class="annot"><a href="GHC.IO.Exception.html#cannotCompactPinned"><span class="hs-identifier hs-type">cannotCompactPinned</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span><span> </span><span class="hs-comment">-- for the RTS</span><span>
</span><span id="line-153"></span><span id="cannotCompactPinned"><span class="annot"><span class="annottext">cannotCompactPinned :: SomeException
</span><a href="GHC.IO.Exception.html#cannotCompactPinned"><span class="hs-identifier hs-var hs-var">cannotCompactPinned</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-154"></span><span>  </span><span class="annot"><span class="annottext">CompactionFailed -&gt; SomeException
forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="GHC.Exception.Type.html#toException"><span class="hs-identifier hs-var">toException</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; CompactionFailed
</span><a href="GHC.IO.Exception.html#CompactionFailed"><span class="hs-identifier hs-var">CompactionFailed</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cannot compact pinned objects&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-155"></span><span>
</span><span id="line-156"></span><span class="annot"><a href="GHC.IO.Exception.html#cannotCompactMutable"><span class="hs-identifier hs-type">cannotCompactMutable</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span><span> </span><span class="hs-comment">-- for the RTS</span><span>
</span><span id="line-157"></span><span id="cannotCompactMutable"><span class="annot"><span class="annottext">cannotCompactMutable :: SomeException
</span><a href="GHC.IO.Exception.html#cannotCompactMutable"><span class="hs-identifier hs-var hs-var">cannotCompactMutable</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-158"></span><span>  </span><span class="annot"><span class="annottext">CompactionFailed -&gt; SomeException
forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="GHC.Exception.Type.html#toException"><span class="hs-identifier hs-var">toException</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; CompactionFailed
</span><a href="GHC.IO.Exception.html#CompactionFailed"><span class="hs-identifier hs-var">CompactionFailed</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cannot compact mutable objects&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span class="hs-comment">-----</span><span>
</span><span id="line-161"></span><span>
</span><span id="line-162"></span><span class="hs-comment">-- |'assert' was applied to 'False'.</span><span>
</span><span id="line-163"></span><span class="hs-keyword">newtype</span><span> </span><span id="AssertionFailed"><span class="annot"><a href="GHC.IO.Exception.html#AssertionFailed"><span class="hs-identifier hs-var">AssertionFailed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="AssertionFailed"><span class="annot"><a href="GHC.IO.Exception.html#AssertionFailed"><span class="hs-identifier hs-var">AssertionFailed</span></a></span></span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-164"></span><span>
</span><span id="line-165"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-166"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531849"><span id="local-6989586621679531851"><span id="local-6989586621679531853"><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#AssertionFailed"><span class="hs-identifier hs-type">AssertionFailed</span></a></span></span></span></span><span>
</span><span id="line-167"></span><span>
</span><span id="line-168"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-169"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531844"><span id="local-6989586621679531846"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#AssertionFailed"><span class="hs-identifier hs-type">AssertionFailed</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-170"></span><span>    </span><span id="local-6989586621679531843"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; AssertionFailed -&gt; ShowS
</span><a href="#local-6989586621679531843"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Exception.html#AssertionFailed"><span class="hs-identifier hs-type">AssertionFailed</span></a></span><span> </span><span id="local-6989586621679531842"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531842"><span class="hs-identifier hs-var">err</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531842"><span class="hs-identifier hs-var">err</span></a></span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span class="hs-comment">-----</span><span>
</span><span id="line-173"></span><span>
</span><span id="line-174"></span><span class="hs-comment">-- |Superclass for asynchronous exceptions.</span><span>
</span><span id="line-175"></span><span class="hs-comment">--</span><span>
</span><span id="line-176"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-177"></span><span class="hs-keyword">data</span><span> </span><span id="SomeAsyncException"><span class="annot"><a href="GHC.IO.Exception.html#SomeAsyncException"><span class="hs-identifier hs-var">SomeAsyncException</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679532120"><span class="annot"><a href="#local-6989586621679532120"><span class="hs-identifier hs-type">e</span></a></span></span><span> </span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532120"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span id="SomeAsyncException"><span class="annot"><a href="GHC.IO.Exception.html#SomeAsyncException"><span class="hs-identifier hs-var">SomeAsyncException</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621679532120"><span class="hs-identifier hs-type">e</span></a></span><span>
</span><span id="line-178"></span><span>
</span><span id="line-179"></span><span class="hs-comment">-- | @since 4.7.0.0</span><span>
</span><span id="line-180"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531836"><span id="local-6989586621679531838"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#SomeAsyncException"><span class="hs-identifier hs-type">SomeAsyncException</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-181"></span><span>    </span><span id="local-6989586621679531835"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; SomeAsyncException -&gt; ShowS
</span><a href="#local-6989586621679531835"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span id="local-6989586621679531834"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679531834"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Exception.html#SomeAsyncException"><span class="hs-identifier hs-type">SomeAsyncException</span></a></span><span> </span><span id="local-6989586621679531829"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679531829"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; e -&gt; ShowS
forall a. Show a =&gt; Int -&gt; a -&gt; ShowS
</span><a href="GHC.Show.html#showsPrec"><span class="hs-identifier hs-var">showsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679531834"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679531829"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span class="hs-comment">-- | @since 4.7.0.0</span><span>
</span><span id="line-184"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531819"><span id="local-6989586621679531821"><span id="local-6989586621679531823"><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#SomeAsyncException"><span class="hs-identifier hs-type">SomeAsyncException</span></a></span></span></span></span><span>
</span><span id="line-185"></span><span>
</span><span id="line-186"></span><span class="hs-comment">-- |@since 4.7.0.0</span><span>
</span><span id="line-187"></span><span id="local-6989586621679531818"><span class="annot"><a href="GHC.IO.Exception.html#asyncExceptionToException"><span class="hs-identifier hs-type">asyncExceptionToException</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679531818"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679531818"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span></span><span>
</span><span id="line-188"></span><span id="asyncExceptionToException"><span class="annot"><span class="annottext">asyncExceptionToException :: forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="GHC.IO.Exception.html#asyncExceptionToException"><span class="hs-identifier hs-var hs-var">asyncExceptionToException</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SomeAsyncException -&gt; SomeException
forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="GHC.Exception.Type.html#toException"><span class="hs-identifier hs-var">toException</span></a></span><span> </span><span class="annot"><span class="annottext">(SomeAsyncException -&gt; SomeException)
-&gt; (e -&gt; SomeAsyncException) -&gt; e -&gt; SomeException
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">e -&gt; SomeAsyncException
forall e. Exception e =&gt; e -&gt; SomeAsyncException
</span><a href="GHC.IO.Exception.html#SomeAsyncException"><span class="hs-identifier hs-var">SomeAsyncException</span></a></span><span>
</span><span id="line-189"></span><span>
</span><span id="line-190"></span><span class="hs-comment">-- |@since 4.7.0.0</span><span>
</span><span id="line-191"></span><span id="local-6989586621679532127"><span class="annot"><a href="GHC.IO.Exception.html#asyncExceptionFromException"><span class="hs-identifier hs-type">asyncExceptionFromException</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532127"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532127"><span class="hs-identifier hs-type">e</span></a></span></span><span>
</span><span id="line-192"></span><span id="asyncExceptionFromException"><span class="annot"><span class="annottext">asyncExceptionFromException :: forall e. Exception e =&gt; SomeException -&gt; Maybe e
</span><a href="GHC.IO.Exception.html#asyncExceptionFromException"><span class="hs-identifier hs-var hs-var">asyncExceptionFromException</span></a></span></span><span> </span><span id="local-6989586621679531807"><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679531807"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-193"></span><span>    </span><span class="annot"><a href="GHC.IO.Exception.html#SomeAsyncException"><span class="hs-identifier hs-type">SomeAsyncException</span></a></span><span> </span><span id="local-6989586621679531802"><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679531802"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SomeException -&gt; Maybe SomeAsyncException
forall e. Exception e =&gt; SomeException -&gt; Maybe e
</span><a href="GHC.Exception.Type.html#fromException"><span class="hs-identifier hs-var">fromException</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679531807"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-194"></span><span>    </span><span class="annot"><span class="annottext">e -&gt; Maybe e
forall a b. (Typeable a, Typeable b) =&gt; a -&gt; Maybe b
</span><a href="Data.Typeable.html#cast"><span class="hs-identifier hs-var">cast</span></a></span><span> </span><span class="annot"><span class="annottext">e
</span><a href="#local-6989586621679531802"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-195"></span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span class="hs-comment">-- |Asynchronous exceptions.</span><span>
</span><span id="line-198"></span><span class="hs-keyword">data</span><span> </span><span id="AsyncException"><span class="annot"><a href="GHC.IO.Exception.html#AsyncException"><span class="hs-identifier hs-var">AsyncException</span></a></span></span><span>
</span><span id="line-199"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="StackOverflow"><span class="annot"><a href="GHC.IO.Exception.html#StackOverflow"><span class="hs-identifier hs-var">StackOverflow</span></a></span></span><span>
</span><span id="line-200"></span><span>        </span><span class="hs-comment">-- ^The current thread\'s stack exceeded its limit.</span><span>
</span><span id="line-201"></span><span>        </span><span class="hs-comment">-- Since an exception has been raised, the thread\'s stack</span><span>
</span><span id="line-202"></span><span>        </span><span class="hs-comment">-- will certainly be below its limit again, but the</span><span>
</span><span id="line-203"></span><span>        </span><span class="hs-comment">-- programmer should take remedial action</span><span>
</span><span id="line-204"></span><span>        </span><span class="hs-comment">-- immediately.</span><span>
</span><span id="line-205"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="HeapOverflow"><span class="annot"><a href="GHC.IO.Exception.html#HeapOverflow"><span class="hs-identifier hs-var">HeapOverflow</span></a></span></span><span>
</span><span id="line-206"></span><span>        </span><span class="hs-comment">-- ^The program\'s heap is reaching its limit, and</span><span>
</span><span id="line-207"></span><span>        </span><span class="hs-comment">-- the program should take action to reduce the amount of</span><span>
</span><span id="line-208"></span><span>        </span><span class="hs-comment">-- live data it has. Notes:</span><span>
</span><span id="line-209"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-210"></span><span>        </span><span class="hs-comment">--   * It is undefined which thread receives this exception.</span><span>
</span><span id="line-211"></span><span>        </span><span class="hs-comment">--     GHC currently throws this to the same thread that</span><span>
</span><span id="line-212"></span><span>        </span><span class="hs-comment">--     receives 'UserInterrupt', but this may change in the</span><span>
</span><span id="line-213"></span><span>        </span><span class="hs-comment">--     future.</span><span>
</span><span id="line-214"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-215"></span><span>        </span><span class="hs-comment">--   * The GHC RTS currently can only recover from heap overflow</span><span>
</span><span id="line-216"></span><span>        </span><span class="hs-comment">--     if it detects that an explicit memory limit (set via RTS flags).</span><span>
</span><span id="line-217"></span><span>        </span><span class="hs-comment">--     has been exceeded.  Currently, failure to allocate memory from</span><span>
</span><span id="line-218"></span><span>        </span><span class="hs-comment">--     the operating system results in immediate termination of the</span><span>
</span><span id="line-219"></span><span>        </span><span class="hs-comment">--     program.</span><span>
</span><span id="line-220"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ThreadKilled"><span class="annot"><a href="GHC.IO.Exception.html#ThreadKilled"><span class="hs-identifier hs-var">ThreadKilled</span></a></span></span><span>
</span><span id="line-221"></span><span>        </span><span class="hs-comment">-- ^This exception is raised by another thread</span><span>
</span><span id="line-222"></span><span>        </span><span class="hs-comment">-- calling 'Control.Concurrent.killThread', or by the system</span><span>
</span><span id="line-223"></span><span>        </span><span class="hs-comment">-- if it needs to terminate the thread for some</span><span>
</span><span id="line-224"></span><span>        </span><span class="hs-comment">-- reason.</span><span>
</span><span id="line-225"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="UserInterrupt"><span class="annot"><a href="GHC.IO.Exception.html#UserInterrupt"><span class="hs-identifier hs-var">UserInterrupt</span></a></span></span><span>
</span><span id="line-226"></span><span>        </span><span class="hs-comment">-- ^This exception is raised by default in the main thread of</span><span>
</span><span id="line-227"></span><span>        </span><span class="hs-comment">-- the program when the user requests to terminate the program</span><span>
</span><span id="line-228"></span><span>        </span><span class="hs-comment">-- via the usual mechanism(s) (e.g. Control-C in the console).</span><span>
</span><span id="line-229"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span id="local-6989586621679531794"><span id="local-6989586621679531796"><span class="annot"><span class="annottext">AsyncException -&gt; AsyncException -&gt; Bool
(AsyncException -&gt; AsyncException -&gt; Bool)
-&gt; (AsyncException -&gt; AsyncException -&gt; Bool) -&gt; Eq AsyncException
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: AsyncException -&gt; AsyncException -&gt; Bool
$c/= :: AsyncException -&gt; AsyncException -&gt; Bool
== :: AsyncException -&gt; AsyncException -&gt; Bool
$c== :: AsyncException -&gt; AsyncException -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></a></span></span></span><span>  </span><span class="hs-comment">-- ^ @since 4.2.0.0</span><span>
</span><span id="line-230"></span><span>           </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679531774"><span id="local-6989586621679531776"><span id="local-6989586621679531779"><span id="local-6989586621679531782"><span id="local-6989586621679531785"><span id="local-6989586621679531787"><span id="local-6989586621679531789"><span class="annot"><span class="annottext">Eq AsyncException
Eq AsyncException
-&gt; (AsyncException -&gt; AsyncException -&gt; Ordering)
-&gt; (AsyncException -&gt; AsyncException -&gt; Bool)
-&gt; (AsyncException -&gt; AsyncException -&gt; Bool)
-&gt; (AsyncException -&gt; AsyncException -&gt; Bool)
-&gt; (AsyncException -&gt; AsyncException -&gt; Bool)
-&gt; (AsyncException -&gt; AsyncException -&gt; AsyncException)
-&gt; (AsyncException -&gt; AsyncException -&gt; AsyncException)
-&gt; Ord AsyncException
AsyncException -&gt; AsyncException -&gt; Bool
AsyncException -&gt; AsyncException -&gt; Ordering
AsyncException -&gt; AsyncException -&gt; AsyncException
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: AsyncException -&gt; AsyncException -&gt; AsyncException
$cmin :: AsyncException -&gt; AsyncException -&gt; AsyncException
max :: AsyncException -&gt; AsyncException -&gt; AsyncException
$cmax :: AsyncException -&gt; AsyncException -&gt; AsyncException
&gt;= :: AsyncException -&gt; AsyncException -&gt; Bool
$c&gt;= :: AsyncException -&gt; AsyncException -&gt; Bool
&gt; :: AsyncException -&gt; AsyncException -&gt; Bool
$c&gt; :: AsyncException -&gt; AsyncException -&gt; Bool
&lt;= :: AsyncException -&gt; AsyncException -&gt; Bool
$c&lt;= :: AsyncException -&gt; AsyncException -&gt; Bool
&lt; :: AsyncException -&gt; AsyncException -&gt; Bool
$c&lt; :: AsyncException -&gt; AsyncException -&gt; Bool
compare :: AsyncException -&gt; AsyncException -&gt; Ordering
$ccompare :: AsyncException -&gt; AsyncException -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></a></span></span></span></span></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.2.0.0</span><span>
</span><span id="line-231"></span><span>           </span><span class="hs-special">)</span><span>
</span><span id="line-232"></span><span>
</span><span id="line-233"></span><span class="hs-comment">-- | @since 4.7.0.0</span><span>
</span><span id="line-234"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531765"><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#AsyncException"><span class="hs-identifier hs-type">AsyncException</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-235"></span><span>  </span><span id="local-6989586621679531763"><span class="annot"><span class="annottext">toException :: AsyncException -&gt; SomeException
</span><a href="#local-6989586621679531763"><span class="hs-identifier hs-var hs-var hs-var hs-var">toException</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AsyncException -&gt; SomeException
forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="GHC.IO.Exception.html#asyncExceptionToException"><span class="hs-identifier hs-var">asyncExceptionToException</span></a></span><span>
</span><span id="line-236"></span><span>  </span><span id="local-6989586621679531761"><span class="annot"><span class="annottext">fromException :: SomeException -&gt; Maybe AsyncException
</span><a href="#local-6989586621679531761"><span class="hs-identifier hs-var hs-var hs-var hs-var">fromException</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SomeException -&gt; Maybe AsyncException
forall e. Exception e =&gt; SomeException -&gt; Maybe e
</span><a href="GHC.IO.Exception.html#asyncExceptionFromException"><span class="hs-identifier hs-var">asyncExceptionFromException</span></a></span><span>
</span><span id="line-237"></span><span>
</span><span id="line-238"></span><span class="hs-comment">-- | Exceptions generated by array operations</span><span>
</span><span id="line-239"></span><span class="hs-keyword">data</span><span> </span><span id="ArrayException"><span class="annot"><a href="GHC.IO.Exception.html#ArrayException"><span class="hs-identifier hs-var">ArrayException</span></a></span></span><span>
</span><span id="line-240"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="IndexOutOfBounds"><span class="annot"><a href="GHC.IO.Exception.html#IndexOutOfBounds"><span class="hs-identifier hs-var">IndexOutOfBounds</span></a></span></span><span>    </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-241"></span><span>        </span><span class="hs-comment">-- ^An attempt was made to index an array outside</span><span>
</span><span id="line-242"></span><span>        </span><span class="hs-comment">-- its declared bounds.</span><span>
</span><span id="line-243"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="UndefinedElement"><span class="annot"><a href="GHC.IO.Exception.html#UndefinedElement"><span class="hs-identifier hs-var">UndefinedElement</span></a></span></span><span>    </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-244"></span><span>        </span><span class="hs-comment">-- ^An attempt was made to evaluate an element of an</span><span>
</span><span id="line-245"></span><span>        </span><span class="hs-comment">-- array that had not been initialized.</span><span>
</span><span id="line-246"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span id="local-6989586621679531751"><span id="local-6989586621679531757"><span class="annot"><span class="annottext">ArrayException -&gt; ArrayException -&gt; Bool
(ArrayException -&gt; ArrayException -&gt; Bool)
-&gt; (ArrayException -&gt; ArrayException -&gt; Bool) -&gt; Eq ArrayException
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: ArrayException -&gt; ArrayException -&gt; Bool
$c/= :: ArrayException -&gt; ArrayException -&gt; Bool
== :: ArrayException -&gt; ArrayException -&gt; Bool
$c== :: ArrayException -&gt; ArrayException -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></a></span></span></span><span>  </span><span class="hs-comment">-- ^ @since 4.2.0.0</span><span>
</span><span id="line-247"></span><span>           </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679531724"><span id="local-6989586621679531726"><span id="local-6989586621679531729"><span id="local-6989586621679531732"><span id="local-6989586621679531735"><span id="local-6989586621679531740"><span id="local-6989586621679531746"><span class="annot"><span class="annottext">Eq ArrayException
Eq ArrayException
-&gt; (ArrayException -&gt; ArrayException -&gt; Ordering)
-&gt; (ArrayException -&gt; ArrayException -&gt; Bool)
-&gt; (ArrayException -&gt; ArrayException -&gt; Bool)
-&gt; (ArrayException -&gt; ArrayException -&gt; Bool)
-&gt; (ArrayException -&gt; ArrayException -&gt; Bool)
-&gt; (ArrayException -&gt; ArrayException -&gt; ArrayException)
-&gt; (ArrayException -&gt; ArrayException -&gt; ArrayException)
-&gt; Ord ArrayException
ArrayException -&gt; ArrayException -&gt; Bool
ArrayException -&gt; ArrayException -&gt; Ordering
ArrayException -&gt; ArrayException -&gt; ArrayException
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: ArrayException -&gt; ArrayException -&gt; ArrayException
$cmin :: ArrayException -&gt; ArrayException -&gt; ArrayException
max :: ArrayException -&gt; ArrayException -&gt; ArrayException
$cmax :: ArrayException -&gt; ArrayException -&gt; ArrayException
&gt;= :: ArrayException -&gt; ArrayException -&gt; Bool
$c&gt;= :: ArrayException -&gt; ArrayException -&gt; Bool
&gt; :: ArrayException -&gt; ArrayException -&gt; Bool
$c&gt; :: ArrayException -&gt; ArrayException -&gt; Bool
&lt;= :: ArrayException -&gt; ArrayException -&gt; Bool
$c&lt;= :: ArrayException -&gt; ArrayException -&gt; Bool
&lt; :: ArrayException -&gt; ArrayException -&gt; Bool
$c&lt; :: ArrayException -&gt; ArrayException -&gt; Bool
compare :: ArrayException -&gt; ArrayException -&gt; Ordering
$ccompare :: ArrayException -&gt; ArrayException -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></a></span></span></span></span></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.2.0.0</span><span>
</span><span id="line-248"></span><span>           </span><span class="hs-special">)</span><span>
</span><span id="line-249"></span><span>
</span><span id="line-250"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-251"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531713"><span id="local-6989586621679531715"><span id="local-6989586621679531717"><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#ArrayException"><span class="hs-identifier hs-type">ArrayException</span></a></span></span></span></span><span>
</span><span id="line-252"></span><span>
</span><span id="line-253"></span><span class="hs-comment">-- for the RTS</span><span>
</span><span id="line-254"></span><span class="annot"><a href="GHC.IO.Exception.html#stackOverflow"><span class="hs-identifier hs-type">stackOverflow</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#heapOverflow"><span class="hs-identifier hs-type">heapOverflow</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span><span>
</span><span id="line-255"></span><span id="stackOverflow"><span class="annot"><span class="annottext">stackOverflow :: SomeException
</span><a href="GHC.IO.Exception.html#stackOverflow"><span class="hs-identifier hs-var hs-var">stackOverflow</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AsyncException -&gt; SomeException
forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="GHC.Exception.Type.html#toException"><span class="hs-identifier hs-var">toException</span></a></span><span> </span><span class="annot"><span class="annottext">AsyncException
</span><a href="GHC.IO.Exception.html#StackOverflow"><span class="hs-identifier hs-var">StackOverflow</span></a></span><span>
</span><span id="line-256"></span><span id="heapOverflow"><span class="annot"><span class="annottext">heapOverflow :: SomeException
</span><a href="GHC.IO.Exception.html#heapOverflow"><span class="hs-identifier hs-var hs-var">heapOverflow</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AsyncException -&gt; SomeException
forall e. Exception e =&gt; e -&gt; SomeException
</span><a href="GHC.Exception.Type.html#toException"><span class="hs-identifier hs-var">toException</span></a></span><span> </span><span class="annot"><span class="annottext">AsyncException
</span><a href="GHC.IO.Exception.html#HeapOverflow"><span class="hs-identifier hs-var">HeapOverflow</span></a></span><span>
</span><span id="line-257"></span><span>
</span><span id="line-258"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-259"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531708"><span id="local-6989586621679531710"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#AsyncException"><span class="hs-identifier hs-type">AsyncException</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-260"></span><span>  </span><span id="local-6989586621679531707"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; AsyncException -&gt; ShowS
</span><a href="#local-6989586621679531707"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">AsyncException
</span><a href="GHC.IO.Exception.html#StackOverflow"><span class="hs-identifier hs-var">StackOverflow</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;stack overflow&quot;</span></span><span>
</span><span id="line-261"></span><span>  </span><span class="annot"><a href="GHC.Show.html#showsPrec"><span class="hs-identifier hs-var">showsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">AsyncException
</span><a href="GHC.IO.Exception.html#HeapOverflow"><span class="hs-identifier hs-var">HeapOverflow</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;heap overflow&quot;</span></span><span>
</span><span id="line-262"></span><span>  </span><span class="annot"><a href="GHC.Show.html#showsPrec"><span class="hs-identifier hs-var">showsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">AsyncException
</span><a href="GHC.IO.Exception.html#ThreadKilled"><span class="hs-identifier hs-var">ThreadKilled</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;thread killed&quot;</span></span><span>
</span><span id="line-263"></span><span>  </span><span class="annot"><a href="GHC.Show.html#showsPrec"><span class="hs-identifier hs-var">showsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">AsyncException
</span><a href="GHC.IO.Exception.html#UserInterrupt"><span class="hs-identifier hs-var">UserInterrupt</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;user interrupt&quot;</span></span><span>
</span><span id="line-264"></span><span>
</span><span id="line-265"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-266"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531702"><span id="local-6989586621679531704"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#ArrayException"><span class="hs-identifier hs-type">ArrayException</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-267"></span><span>  </span><span id="local-6989586621679531701"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; ArrayException -&gt; ShowS
</span><a href="#local-6989586621679531701"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Exception.html#IndexOutOfBounds"><span class="hs-identifier hs-type">IndexOutOfBounds</span></a></span><span> </span><span id="local-6989586621679531700"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531700"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-268"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;array index out of range&quot;</span></span><span>
</span><span id="line-269"></span><span>        </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. [a] -&gt; Bool
</span><a href="GHC.List.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531700"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;: &quot;</span></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531700"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-270"></span><span>                           </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">ShowS
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-271"></span><span>  </span><span class="annot"><a href="GHC.Show.html#showsPrec"><span class="hs-identifier hs-var">showsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Exception.html#UndefinedElement"><span class="hs-identifier hs-type">UndefinedElement</span></a></span><span> </span><span id="local-6989586621679531696"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531696"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-272"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;undefined array element&quot;</span></span><span>
</span><span id="line-273"></span><span>        </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. [a] -&gt; Bool
</span><a href="GHC.List.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531696"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;: &quot;</span></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531696"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-274"></span><span>                           </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">ShowS
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-275"></span><span>
</span><span id="line-276"></span><span class="hs-comment">-- | The exception thrown when an infinite cycle is detected in</span><span>
</span><span id="line-277"></span><span class="hs-comment">-- 'System.IO.fixIO'.</span><span>
</span><span id="line-278"></span><span class="hs-comment">--</span><span>
</span><span id="line-279"></span><span class="hs-comment">-- @since 4.11.0.0</span><span>
</span><span id="line-280"></span><span class="hs-keyword">data</span><span> </span><span id="FixIOException"><span class="annot"><a href="GHC.IO.Exception.html#FixIOException"><span class="hs-identifier hs-var">FixIOException</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="FixIOException"><span class="annot"><a href="GHC.IO.Exception.html#FixIOException"><span class="hs-identifier hs-var">FixIOException</span></a></span></span><span>
</span><span id="line-281"></span><span>
</span><span id="line-282"></span><span class="hs-comment">-- | @since 4.11.0.0</span><span>
</span><span id="line-283"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531685"><span id="local-6989586621679531687"><span id="local-6989586621679531689"><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#FixIOException"><span class="hs-identifier hs-type">FixIOException</span></a></span></span></span></span><span>
</span><span id="line-284"></span><span>
</span><span id="line-285"></span><span class="hs-comment">-- | @since 4.11.0.0</span><span>
</span><span id="line-286"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531680"><span id="local-6989586621679531682"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#FixIOException"><span class="hs-identifier hs-type">FixIOException</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-287"></span><span>  </span><span id="local-6989586621679531679"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; FixIOException -&gt; ShowS
</span><a href="#local-6989586621679531679"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">FixIOException
</span><a href="GHC.IO.Exception.html#FixIOException"><span class="hs-identifier hs-var">FixIOException</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cyclic evaluation in fixIO&quot;</span></span><span>
</span><span id="line-288"></span><span>
</span><span id="line-289"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-290"></span><span class="hs-comment">-- The ExitCode type</span><span>
</span><span id="line-291"></span><span>
</span><span id="line-292"></span><span class="hs-comment">-- We need it here because it is used in ExitException in the</span><span>
</span><span id="line-293"></span><span class="hs-comment">-- Exception datatype (above).</span><span>
</span><span id="line-294"></span><span>
</span><span id="line-295"></span><span class="hs-comment">-- | Defines the exit codes that a program can return.</span><span>
</span><span id="line-296"></span><span id="local-6989586621679531677"><span id="local-6989586621679531678"></span></span><span class="hs-keyword">data</span><span> </span><span id="ExitCode"><span class="annot"><a href="GHC.IO.Exception.html#ExitCode"><span class="hs-identifier hs-var">ExitCode</span></a></span></span><span>
</span><span id="line-297"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="ExitSuccess"><span class="annot"><a href="GHC.IO.Exception.html#ExitSuccess"><span class="hs-identifier hs-var">ExitSuccess</span></a></span></span><span> </span><span class="hs-comment">-- ^ indicates successful termination;</span><span>
</span><span id="line-298"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ExitFailure"><span class="annot"><a href="GHC.IO.Exception.html#ExitFailure"><span class="hs-identifier hs-var">ExitFailure</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-299"></span><span>                </span><span class="hs-comment">-- ^ indicates program failure with an exit code.</span><span>
</span><span id="line-300"></span><span>                </span><span class="hs-comment">-- The exact interpretation of the code is</span><span>
</span><span id="line-301"></span><span>                </span><span class="hs-comment">-- operating-system dependent.  In particular, some values</span><span>
</span><span id="line-302"></span><span>                </span><span class="hs-comment">-- may be prohibited (e.g. 0 on a POSIX-compliant system).</span><span>
</span><span id="line-303"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679531669"><span id="local-6989586621679531673"><span class="annot"><span class="annottext">ExitCode -&gt; ExitCode -&gt; Bool
(ExitCode -&gt; ExitCode -&gt; Bool)
-&gt; (ExitCode -&gt; ExitCode -&gt; Bool) -&gt; Eq ExitCode
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: ExitCode -&gt; ExitCode -&gt; Bool
$c/= :: ExitCode -&gt; ExitCode -&gt; Bool
== :: ExitCode -&gt; ExitCode -&gt; Bool
$c== :: ExitCode -&gt; ExitCode -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></a></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679531647"><span id="local-6989586621679531649"><span id="local-6989586621679531652"><span id="local-6989586621679531655"><span id="local-6989586621679531658"><span id="local-6989586621679531661"><span id="local-6989586621679531665"><span class="annot"><span class="annottext">Eq ExitCode
Eq ExitCode
-&gt; (ExitCode -&gt; ExitCode -&gt; Ordering)
-&gt; (ExitCode -&gt; ExitCode -&gt; Bool)
-&gt; (ExitCode -&gt; ExitCode -&gt; Bool)
-&gt; (ExitCode -&gt; ExitCode -&gt; Bool)
-&gt; (ExitCode -&gt; ExitCode -&gt; Bool)
-&gt; (ExitCode -&gt; ExitCode -&gt; ExitCode)
-&gt; (ExitCode -&gt; ExitCode -&gt; ExitCode)
-&gt; Ord ExitCode
ExitCode -&gt; ExitCode -&gt; Bool
ExitCode -&gt; ExitCode -&gt; Ordering
ExitCode -&gt; ExitCode -&gt; ExitCode
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: ExitCode -&gt; ExitCode -&gt; ExitCode
$cmin :: ExitCode -&gt; ExitCode -&gt; ExitCode
max :: ExitCode -&gt; ExitCode -&gt; ExitCode
$cmax :: ExitCode -&gt; ExitCode -&gt; ExitCode
&gt;= :: ExitCode -&gt; ExitCode -&gt; Bool
$c&gt;= :: ExitCode -&gt; ExitCode -&gt; Bool
&gt; :: ExitCode -&gt; ExitCode -&gt; Bool
$c&gt; :: ExitCode -&gt; ExitCode -&gt; Bool
&lt;= :: ExitCode -&gt; ExitCode -&gt; Bool
$c&lt;= :: ExitCode -&gt; ExitCode -&gt; Bool
&lt; :: ExitCode -&gt; ExitCode -&gt; Bool
$c&lt; :: ExitCode -&gt; ExitCode -&gt; Bool
compare :: ExitCode -&gt; ExitCode -&gt; Ordering
$ccompare :: ExitCode -&gt; ExitCode -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></a></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679531630"><span id="local-6989586621679531640"><span id="local-6989586621679531643"><span id="local-6989586621679531645"><span class="annot"><span class="annottext">ReadPrec [ExitCode]
ReadPrec ExitCode
Int -&gt; ReadS ExitCode
ReadS [ExitCode]
(Int -&gt; ReadS ExitCode)
-&gt; ReadS [ExitCode]
-&gt; ReadPrec ExitCode
-&gt; ReadPrec [ExitCode]
-&gt; Read ExitCode
forall a.
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; ReadPrec a -&gt; ReadPrec [a] -&gt; Read a
readListPrec :: ReadPrec [ExitCode]
$creadListPrec :: ReadPrec [ExitCode]
readPrec :: ReadPrec ExitCode
$creadPrec :: ReadPrec ExitCode
readList :: ReadS [ExitCode]
$creadList :: ReadS [ExitCode]
readsPrec :: Int -&gt; ReadS ExitCode
$creadsPrec :: Int -&gt; ReadS ExitCode
</span><a href="GHC.Read.html#Read"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Read</span></a></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679531619"><span id="local-6989586621679531621"><span id="local-6989586621679531626"><span class="annot"><span class="annottext">Int -&gt; ExitCode -&gt; ShowS
[ExitCode] -&gt; ShowS
ExitCode -&gt; String
(Int -&gt; ExitCode -&gt; ShowS)
-&gt; (ExitCode -&gt; String) -&gt; ([ExitCode] -&gt; ShowS) -&gt; Show ExitCode
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [ExitCode] -&gt; ShowS
$cshowList :: [ExitCode] -&gt; ShowS
show :: ExitCode -&gt; String
$cshow :: ExitCode -&gt; String
showsPrec :: Int -&gt; ExitCode -&gt; ShowS
$cshowsPrec :: Int -&gt; ExitCode -&gt; ShowS
</span><a href="GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. ExitCode -&gt; Rep ExitCode x)
-&gt; (forall x. Rep ExitCode x -&gt; ExitCode) -&gt; Generic ExitCode
forall x. Rep ExitCode x -&gt; ExitCode
forall x. ExitCode -&gt; Rep ExitCode x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
$cto :: forall x. Rep ExitCode x -&gt; ExitCode
$cfrom :: forall x. ExitCode -&gt; Rep ExitCode x
</span><a href="GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-304"></span><span>
</span><span id="line-305"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-306"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531605"><span id="local-6989586621679531607"><span id="local-6989586621679531609"><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#ExitCode"><span class="hs-identifier hs-type">ExitCode</span></a></span></span></span></span><span>
</span><span id="line-307"></span><span>
</span><span id="line-308"></span><span id="local-6989586621679532103"><span class="annot"><a href="GHC.IO.Exception.html#ioException"><span class="hs-identifier hs-type">ioException</span></a></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOException"><span class="hs-identifier hs-type">IOException</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679532103"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-309"></span><span id="ioException"><span class="annot"><span class="annottext">ioException :: forall a. IOException -&gt; IO a
</span><a href="GHC.IO.Exception.html#ioException"><span class="hs-identifier hs-var hs-var">ioException</span></a></span></span><span> </span><span id="local-6989586621679531603"><span class="annot"><span class="annottext">IOException
</span><a href="#local-6989586621679531603"><span class="hs-identifier hs-var">err</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOException -&gt; IO a
forall e a. Exception e =&gt; e -&gt; IO a
</span><a href="GHC.IO.html#throwIO"><span class="hs-identifier hs-var">throwIO</span></a></span><span> </span><span class="annot"><span class="annottext">IOException
</span><a href="#local-6989586621679531603"><span class="hs-identifier hs-var">err</span></a></span><span>
</span><span id="line-310"></span><span>
</span><span id="line-311"></span><span class="hs-comment">-- | Raise an 'IOError' in the 'IO' monad.</span><span>
</span><span id="line-312"></span><span id="local-6989586621679531601"><span class="annot"><a href="GHC.IO.Exception.html#ioError"><span class="hs-identifier hs-type">ioError</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679531601"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-313"></span><span id="ioError"><span class="annot"><span class="annottext">ioError :: forall a. IOException -&gt; IO a
</span><a href="GHC.IO.Exception.html#ioError"><span class="hs-identifier hs-var hs-var">ioError</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">IOException -&gt; IO a
forall a. IOException -&gt; IO a
</span><a href="GHC.IO.Exception.html#ioException"><span class="hs-identifier hs-var">ioException</span></a></span><span>
</span><span id="line-314"></span><span>
</span><span id="line-315"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-316"></span><span class="hs-comment">-- IOError type</span><span>
</span><span id="line-317"></span><span>
</span><span id="line-318"></span><span class="hs-comment">-- | The Haskell 2010 type for exceptions in the 'IO' monad.</span><span>
</span><span id="line-319"></span><span class="hs-comment">-- Any I\/O operation may raise an 'IOError' instead of returning a result.</span><span>
</span><span id="line-320"></span><span class="hs-comment">-- For a more general type of exception, including also those that arise</span><span>
</span><span id="line-321"></span><span class="hs-comment">-- in pure code, see 'Control.Exception.Exception'.</span><span>
</span><span id="line-322"></span><span class="hs-comment">--</span><span>
</span><span id="line-323"></span><span class="hs-comment">-- In Haskell 2010, this is an opaque type.</span><span>
</span><span id="line-324"></span><span class="hs-keyword">type</span><span> </span><span id="IOError"><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-var">IOError</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOException"><span class="hs-identifier hs-type">IOException</span></a></span><span>
</span><span id="line-325"></span><span>
</span><span id="line-326"></span><span class="hs-comment">-- |Exceptions that occur in the @IO@ monad.</span><span>
</span><span id="line-327"></span><span class="hs-comment">-- An @IOException@ records a more specific error type, a descriptive</span><span>
</span><span id="line-328"></span><span class="hs-comment">-- string and maybe the handle that was used when the error was</span><span>
</span><span id="line-329"></span><span class="hs-comment">-- flagged.</span><span>
</span><span id="line-330"></span><span class="hs-keyword">data</span><span> </span><span id="IOException"><span class="annot"><a href="GHC.IO.Exception.html#IOException"><span class="hs-identifier hs-var">IOException</span></a></span></span><span>
</span><span id="line-331"></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="IOError"><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-var">IOError</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-332"></span><span>     </span><span id="ioe_handle"><span class="annot"><span class="annottext">IOException -&gt; Maybe Handle
</span><a href="GHC.IO.Exception.html#ioe_handle"><span class="hs-identifier hs-var hs-var">ioe_handle</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Handle.Types.html#Handle"><span class="hs-identifier hs-type">Handle</span></a></span><span class="hs-special">,</span><span>   </span><span class="hs-comment">-- the handle used by the action flagging</span><span>
</span><span id="line-333"></span><span>                                     </span><span class="hs-comment">-- the error.</span><span>
</span><span id="line-334"></span><span>     </span><span id="ioe_type"><span class="annot"><span class="annottext">IOException -&gt; IOErrorType
</span><a href="GHC.IO.Exception.html#ioe_type"><span class="hs-identifier hs-var hs-var">ioe_type</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span class="hs-special">,</span><span>    </span><span class="hs-comment">-- what it was.</span><span>
</span><span id="line-335"></span><span>     </span><span id="ioe_location"><span class="annot"><span class="annottext">IOException -&gt; String
</span><a href="GHC.IO.Exception.html#ioe_location"><span class="hs-identifier hs-var hs-var">ioe_location</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span>         </span><span class="hs-comment">-- location.</span><span>
</span><span id="line-336"></span><span>     </span><span id="ioe_description"><span class="annot"><span class="annottext">IOException -&gt; String
</span><a href="GHC.IO.Exception.html#ioe_description"><span class="hs-identifier hs-var hs-var">ioe_description</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span>      </span><span class="hs-comment">-- error type specific information.</span><span>
</span><span id="line-337"></span><span>     </span><span id="ioe_errno"><span class="annot"><span class="annottext">IOException -&gt; Maybe CInt
</span><a href="GHC.IO.Exception.html#ioe_errno"><span class="hs-identifier hs-var hs-var">ioe_errno</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Foreign.C.Types.html#CInt"><span class="hs-identifier hs-type">CInt</span></a></span><span class="hs-special">,</span><span>     </span><span class="hs-comment">-- errno leading to this error, if any.</span><span>
</span><span id="line-338"></span><span>     </span><span id="ioe_filename"><span class="annot"><span class="annottext">IOException -&gt; Maybe String
</span><a href="GHC.IO.Exception.html#ioe_filename"><span class="hs-identifier hs-var hs-var">ioe_filename</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>  </span><span class="hs-comment">-- filename the error is related to.</span><span>
</span><span id="line-339"></span><span>   </span><span class="hs-special">}</span><span>
</span><span id="line-340"></span><span>
</span><span id="line-341"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-342"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531583"><span id="local-6989586621679531585"><span id="local-6989586621679531587"><span class="annot"><a href="GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOException"><span class="hs-identifier hs-type">IOException</span></a></span></span></span></span><span>
</span><span id="line-343"></span><span>
</span><span id="line-344"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-345"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531580"><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOException"><span class="hs-identifier hs-type">IOException</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-346"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span id="local-6989586621679531567"><span class="annot"><span class="annottext">Maybe Handle
</span><a href="#local-6989586621679531567"><span class="hs-identifier hs-var">h1</span></a></span></span><span> </span><span id="local-6989586621679531566"><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679531566"><span class="hs-identifier hs-var">e1</span></a></span></span><span> </span><span id="local-6989586621679531565"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531565"><span class="hs-identifier hs-var">loc1</span></a></span></span><span> </span><span id="local-6989586621679531564"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531564"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span id="local-6989586621679531563"><span class="annot"><span class="annottext">Maybe CInt
</span><a href="#local-6989586621679531563"><span class="hs-identifier hs-var">en1</span></a></span></span><span> </span><span id="local-6989586621679531562"><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679531562"><span class="hs-identifier hs-var">fn1</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679531561"><span class="annot"><span class="annottext">== :: IOException -&gt; IOException -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">==</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span id="local-6989586621679531560"><span class="annot"><span class="annottext">Maybe Handle
</span><a href="#local-6989586621679531560"><span class="hs-identifier hs-var">h2</span></a></span></span><span> </span><span id="local-6989586621679531559"><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679531559"><span class="hs-identifier hs-var">e2</span></a></span></span><span> </span><span id="local-6989586621679531558"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531558"><span class="hs-identifier hs-var">loc2</span></a></span></span><span> </span><span id="local-6989586621679531557"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531557"><span class="hs-identifier hs-var">str2</span></a></span></span><span> </span><span id="local-6989586621679531556"><span class="annot"><span class="annottext">Maybe CInt
</span><a href="#local-6989586621679531556"><span class="hs-identifier hs-var">en2</span></a></span></span><span> </span><span id="local-6989586621679531555"><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679531555"><span class="hs-identifier hs-var">fn2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-347"></span><span>    </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679531566"><span class="hs-identifier hs-var">e1</span></a></span><span class="annot"><span class="annottext">IOErrorType -&gt; IOErrorType -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679531559"><span class="hs-identifier hs-var">e2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531564"><span class="hs-identifier hs-var">str1</span></a></span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531557"><span class="hs-identifier hs-var">str2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Handle
</span><a href="#local-6989586621679531567"><span class="hs-identifier hs-var">h1</span></a></span><span class="annot"><span class="annottext">Maybe Handle -&gt; Maybe Handle -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span class="annot"><span class="annottext">Maybe Handle
</span><a href="#local-6989586621679531560"><span class="hs-identifier hs-var">h2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531565"><span class="hs-identifier hs-var">loc1</span></a></span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531558"><span class="hs-identifier hs-var">loc2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CInt
</span><a href="#local-6989586621679531563"><span class="hs-identifier hs-var">en1</span></a></span><span class="annot"><span class="annottext">Maybe CInt -&gt; Maybe CInt -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span class="annot"><span class="annottext">Maybe CInt
</span><a href="#local-6989586621679531556"><span class="hs-identifier hs-var">en2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679531562"><span class="hs-identifier hs-var">fn1</span></a></span><span class="annot"><span class="annottext">Maybe String -&gt; Maybe String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679531555"><span class="hs-identifier hs-var">fn2</span></a></span><span>
</span><span id="line-348"></span><span>
</span><span id="line-349"></span><span class="hs-comment">-- | An abstract type that contains a value for each variant of 'IOError'.</span><span>
</span><span id="line-350"></span><span class="hs-keyword">data</span><span> </span><span id="IOErrorType"><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-var">IOErrorType</span></a></span></span><span>
</span><span id="line-351"></span><span>  </span><span class="hs-comment">-- Haskell 2010:</span><span>
</span><span id="line-352"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="AlreadyExists"><span class="annot"><a href="GHC.IO.Exception.html#AlreadyExists"><span class="hs-identifier hs-var">AlreadyExists</span></a></span></span><span>
</span><span id="line-353"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="NoSuchThing"><span class="annot"><a href="GHC.IO.Exception.html#NoSuchThing"><span class="hs-identifier hs-var">NoSuchThing</span></a></span></span><span>
</span><span id="line-354"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ResourceBusy"><span class="annot"><a href="GHC.IO.Exception.html#ResourceBusy"><span class="hs-identifier hs-var">ResourceBusy</span></a></span></span><span>
</span><span id="line-355"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ResourceExhausted"><span class="annot"><a href="GHC.IO.Exception.html#ResourceExhausted"><span class="hs-identifier hs-var">ResourceExhausted</span></a></span></span><span>
</span><span id="line-356"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="EOF"><span class="annot"><a href="GHC.IO.Exception.html#EOF"><span class="hs-identifier hs-var">EOF</span></a></span></span><span>
</span><span id="line-357"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="IllegalOperation"><span class="annot"><a href="GHC.IO.Exception.html#IllegalOperation"><span class="hs-identifier hs-var">IllegalOperation</span></a></span></span><span>
</span><span id="line-358"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="PermissionDenied"><span class="annot"><a href="GHC.IO.Exception.html#PermissionDenied"><span class="hs-identifier hs-var">PermissionDenied</span></a></span></span><span>
</span><span id="line-359"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="UserError"><span class="annot"><a href="GHC.IO.Exception.html#UserError"><span class="hs-identifier hs-var">UserError</span></a></span></span><span>
</span><span id="line-360"></span><span>  </span><span class="hs-comment">-- GHC only:</span><span>
</span><span id="line-361"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="UnsatisfiedConstraints"><span class="annot"><a href="GHC.IO.Exception.html#UnsatisfiedConstraints"><span class="hs-identifier hs-var">UnsatisfiedConstraints</span></a></span></span><span>
</span><span id="line-362"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="SystemError"><span class="annot"><a href="GHC.IO.Exception.html#SystemError"><span class="hs-identifier hs-var">SystemError</span></a></span></span><span>
</span><span id="line-363"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ProtocolError"><span class="annot"><a href="GHC.IO.Exception.html#ProtocolError"><span class="hs-identifier hs-var">ProtocolError</span></a></span></span><span>
</span><span id="line-364"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="OtherError"><span class="annot"><a href="GHC.IO.Exception.html#OtherError"><span class="hs-identifier hs-var">OtherError</span></a></span></span><span>
</span><span id="line-365"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="InvalidArgument"><span class="annot"><a href="GHC.IO.Exception.html#InvalidArgument"><span class="hs-identifier hs-var">InvalidArgument</span></a></span></span><span>
</span><span id="line-366"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="InappropriateType"><span class="annot"><a href="GHC.IO.Exception.html#InappropriateType"><span class="hs-identifier hs-var">InappropriateType</span></a></span></span><span>
</span><span id="line-367"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="HardwareFault"><span class="annot"><a href="GHC.IO.Exception.html#HardwareFault"><span class="hs-identifier hs-var">HardwareFault</span></a></span></span><span>
</span><span id="line-368"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="UnsupportedOperation"><span class="annot"><a href="GHC.IO.Exception.html#UnsupportedOperation"><span class="hs-identifier hs-var">UnsupportedOperation</span></a></span></span><span>
</span><span id="line-369"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="TimeExpired"><span class="annot"><a href="GHC.IO.Exception.html#TimeExpired"><span class="hs-identifier hs-var">TimeExpired</span></a></span></span><span>
</span><span id="line-370"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ResourceVanished"><span class="annot"><a href="GHC.IO.Exception.html#ResourceVanished"><span class="hs-identifier hs-var">ResourceVanished</span></a></span></span><span>
</span><span id="line-371"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Interrupted"><span class="annot"><a href="GHC.IO.Exception.html#Interrupted"><span class="hs-identifier hs-var">Interrupted</span></a></span></span><span>
</span><span id="line-372"></span><span>
</span><span id="line-373"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-374"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531532"><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-375"></span><span>   </span><span id="local-6989586621679531531"><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679531531"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679531530"><span class="annot"><span class="annottext">== :: IOErrorType -&gt; IOErrorType -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">==</span></a></span></span><span> </span><span id="local-6989586621679531529"><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679531529"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IOErrorType -&gt; Int#
forall a. a -&gt; Int#
</span><a href="GHC.Base.html#getTag"><span class="hs-identifier hs-var">getTag</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679531531"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int# -&gt; Int# -&gt; Int#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType -&gt; Int#
forall a. a -&gt; Int#
</span><a href="GHC.Base.html#getTag"><span class="hs-identifier hs-var">getTag</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679531529"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-376"></span><span>
</span><span id="line-377"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-378"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531522"><span id="local-6989586621679531524"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-379"></span><span>  </span><span id="local-6989586621679531521"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; IOErrorType -&gt; ShowS
</span><a href="#local-6989586621679531521"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679531520"><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679531520"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-380"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ShowS) -&gt; String -&gt; ShowS
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-381"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679531520"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-382"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#AlreadyExists"><span class="hs-identifier hs-var">AlreadyExists</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;already exists&quot;</span></span><span>
</span><span id="line-383"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#NoSuchThing"><span class="hs-identifier hs-var">NoSuchThing</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;does not exist&quot;</span></span><span>
</span><span id="line-384"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#ResourceBusy"><span class="hs-identifier hs-var">ResourceBusy</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;resource busy&quot;</span></span><span>
</span><span id="line-385"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#ResourceExhausted"><span class="hs-identifier hs-var">ResourceExhausted</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;resource exhausted&quot;</span></span><span>
</span><span id="line-386"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#EOF"><span class="hs-identifier hs-var">EOF</span></a></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;end of file&quot;</span></span><span>
</span><span id="line-387"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#IllegalOperation"><span class="hs-identifier hs-var">IllegalOperation</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;illegal operation&quot;</span></span><span>
</span><span id="line-388"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#PermissionDenied"><span class="hs-identifier hs-var">PermissionDenied</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;permission denied&quot;</span></span><span>
</span><span id="line-389"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#UserError"><span class="hs-identifier hs-var">UserError</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;user error&quot;</span></span><span>
</span><span id="line-390"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#HardwareFault"><span class="hs-identifier hs-var">HardwareFault</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hardware fault&quot;</span></span><span>
</span><span id="line-391"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#InappropriateType"><span class="hs-identifier hs-var">InappropriateType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;inappropriate type&quot;</span></span><span>
</span><span id="line-392"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#Interrupted"><span class="hs-identifier hs-var">Interrupted</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;interrupted&quot;</span></span><span>
</span><span id="line-393"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#InvalidArgument"><span class="hs-identifier hs-var">InvalidArgument</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;invalid argument&quot;</span></span><span>
</span><span id="line-394"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#OtherError"><span class="hs-identifier hs-var">OtherError</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;failed&quot;</span></span><span>
</span><span id="line-395"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#ProtocolError"><span class="hs-identifier hs-var">ProtocolError</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;protocol error&quot;</span></span><span>
</span><span id="line-396"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#ResourceVanished"><span class="hs-identifier hs-var">ResourceVanished</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;resource vanished&quot;</span></span><span>
</span><span id="line-397"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#SystemError"><span class="hs-identifier hs-var">SystemError</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;system error&quot;</span></span><span>
</span><span id="line-398"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#TimeExpired"><span class="hs-identifier hs-var">TimeExpired</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;timeout&quot;</span></span><span>
</span><span id="line-399"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#UnsatisfiedConstraints"><span class="hs-identifier hs-var">UnsatisfiedConstraints</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unsatisfied constraints&quot;</span></span><span> </span><span class="hs-comment">-- ultra-precise!</span><span>
</span><span id="line-400"></span><span>      </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#UnsupportedOperation"><span class="hs-identifier hs-var">UnsupportedOperation</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unsupported operation&quot;</span></span><span>
</span><span id="line-401"></span><span>
</span><span id="line-402"></span><span class="hs-comment">-- | Construct an 'IOError' value with a string describing the error.</span><span>
</span><span id="line-403"></span><span class="hs-comment">-- The 'fail' method of the 'IO' instance of the 'Monad' class raises a</span><span>
</span><span id="line-404"></span><span class="hs-comment">-- 'userError', thus:</span><span>
</span><span id="line-405"></span><span class="hs-comment">--</span><span>
</span><span id="line-406"></span><span class="hs-comment">-- &gt; instance Monad IO where</span><span>
</span><span id="line-407"></span><span class="hs-comment">-- &gt;   ...</span><span>
</span><span id="line-408"></span><span class="hs-comment">-- &gt;   fail s = ioError (userError s)</span><span>
</span><span id="line-409"></span><span class="hs-comment">--</span><span>
</span><span id="line-410"></span><span class="annot"><a href="GHC.IO.Exception.html#userError"><span class="hs-identifier hs-type">userError</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span>
</span><span id="line-411"></span><span id="userError"><span class="annot"><span class="annottext">userError :: String -&gt; IOException
</span><a href="GHC.IO.Exception.html#userError"><span class="hs-identifier hs-var hs-var">userError</span></a></span></span><span> </span><span id="local-6989586621679531519"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531519"><span class="hs-identifier hs-var">str</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">Maybe Handle
-&gt; IOErrorType
-&gt; String
-&gt; String
-&gt; Maybe CInt
-&gt; Maybe String
-&gt; IOException
</span><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-var">IOError</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Handle
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#UserError"><span class="hs-identifier hs-var">UserError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531519"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CInt
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-412"></span><span>
</span><span id="line-413"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-414"></span><span class="hs-comment">-- Showing IOErrors</span><span>
</span><span id="line-415"></span><span>
</span><span id="line-416"></span><span class="hs-comment">-- | @since 4.1.0.0</span><span>
</span><span id="line-417"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679531514"><span id="local-6989586621679531516"><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOException"><span class="hs-identifier hs-type">IOException</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-418"></span><span>    </span><span id="local-6989586621679531510"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; IOException -&gt; ShowS
</span><a href="#local-6989586621679531510"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span id="local-6989586621679531509"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679531509"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span id="local-6989586621679531508"><span class="annot"><span class="annottext">Maybe Handle
</span><a href="#local-6989586621679531508"><span class="hs-identifier hs-var">hdl</span></a></span></span><span> </span><span id="local-6989586621679531507"><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679531507"><span class="hs-identifier hs-var">iot</span></a></span></span><span> </span><span id="local-6989586621679531506"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531506"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621679531505"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531505"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe CInt
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679531504"><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679531504"><span class="hs-identifier hs-var">fn</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-419"></span><span>      </span><span class="hs-special">(</span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679531504"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-420"></span><span>         </span><span class="annot"><span class="annottext">Maybe String
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Handle
</span><a href="#local-6989586621679531508"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-421"></span><span>                        </span><span class="annot"><span class="annottext">Maybe Handle
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ShowS
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-422"></span><span>                        </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679531503"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679531503"><span class="hs-identifier hs-var">h</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Handle -&gt; ShowS
forall a. Show a =&gt; Int -&gt; a -&gt; ShowS
</span><a href="GHC.Show.html#showsPrec"><span class="hs-identifier hs-var">showsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679531509"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679531503"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;: &quot;</span></span><span>
</span><span id="line-423"></span><span>         </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679531502"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531502"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531502"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;: &quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span>
</span><span id="line-424"></span><span>      </span><span class="hs-special">(</span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531506"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-425"></span><span>         </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ShowS
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-426"></span><span>         </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531506"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;: &quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span>
</span><span id="line-427"></span><span>      </span><span class="annot"><span class="annottext">Int -&gt; IOErrorType -&gt; ShowS
forall a. Show a =&gt; Int -&gt; a -&gt; ShowS
</span><a href="GHC.Show.html#showsPrec"><span class="hs-identifier hs-var">showsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679531509"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679531507"><span class="hs-identifier hs-var">iot</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span>
</span><span id="line-428"></span><span>      </span><span class="hs-special">(</span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531505"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-429"></span><span>         </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ShowS
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-430"></span><span>         </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; (&quot;</span></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531505"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
</span><a href="GHC.Show.html#showString"><span class="hs-identifier hs-var">showString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;)&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-431"></span><span>
</span><span id="line-432"></span><span class="hs-comment">-- Note the use of &quot;lazy&quot;. This means that</span><span>
</span><span id="line-433"></span><span class="hs-comment">--     assert False (throw e)</span><span>
</span><span id="line-434"></span><span class="hs-comment">-- will throw the assertion failure rather than e. See trac #5561.</span><span>
</span><span id="line-435"></span><span id="local-6989586621679532091"><span class="annot"><a href="GHC.IO.Exception.html#assertError"><span class="hs-identifier hs-type">assertError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="">?callStack</span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Stack.Types.html#CallStack"><span class="hs-identifier hs-type">CallStack</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679532091"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679532091"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-436"></span><span id="assertError"><span class="annot"><span class="annottext">assertError :: forall a. (?callStack::CallStack) =&gt; Bool -&gt; a -&gt; a
</span><a href="GHC.IO.Exception.html#assertError"><span class="hs-identifier hs-var hs-var">assertError</span></a></span></span><span> </span><span id="local-6989586621679531497"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679531497"><span class="hs-identifier hs-var">predicate</span></a></span></span><span> </span><span id="local-6989586621679531496"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679531496"><span class="hs-identifier hs-var">v</span></a></span></span><span>
</span><span id="line-437"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679531497"><span class="hs-identifier hs-var">predicate</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Magic.html#lazy"><span class="hs-identifier hs-var">lazy</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679531496"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-438"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO a -&gt; a
forall a. IO a -&gt; a
</span><a href="GHC.IO.Unsafe.html#unsafeDupablePerformIO"><span class="hs-identifier hs-var">unsafeDupablePerformIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO a -&gt; a) -&gt; IO a -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-439"></span><span>    </span><span id="local-6989586621679531494"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679531494"><span class="hs-identifier hs-var">ccsStack</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO [String]
</span><a href="GHC.Stack.CCS.html#currentCallStack"><span class="hs-identifier hs-var">currentCallStack</span></a></span><span>
</span><span id="line-440"></span><span>    </span><span class="hs-keyword">let</span><span>
</span><span id="line-441"></span><span>      </span><span id="local-6989586621679531491"><span class="annot"><span class="annottext">implicitParamCallStack :: [String]
</span><a href="#local-6989586621679531491"><span class="hs-identifier hs-var hs-var">implicitParamCallStack</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CallStack -&gt; [String]
</span><a href="GHC.Exception.html#prettyCallStackLines"><span class="hs-identifier hs-var">prettyCallStackLines</span></a></span><span> </span><span class="annot"><span class="annottext">?callStack::CallStack
CallStack
</span><a href="#local-6989586621679531492"><span class="hs-var">?callStack</span></a></span><span>
</span><span id="line-442"></span><span>      </span><span id="local-6989586621679531489"><span class="annot"><span class="annottext">ccsCallStack :: [String]
</span><a href="#local-6989586621679531489"><span class="hs-identifier hs-var hs-var">ccsCallStack</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
</span><a href="GHC.Exception.html#showCCSStack"><span class="hs-identifier hs-var">showCCSStack</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679531494"><span class="hs-identifier hs-var">ccsStack</span></a></span><span>
</span><span id="line-443"></span><span>      </span><span id="local-6989586621679531487"><span class="annot"><span class="annottext">stack :: String
</span><a href="#local-6989586621679531487"><span class="hs-identifier hs-var hs-var">stack</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; String
forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="Data.OldList.html#intercalate"><span class="hs-identifier hs-var">intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n&quot;</span></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; String) -&gt; [String] -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679531491"><span class="hs-identifier hs-var">implicitParamCallStack</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679531489"><span class="hs-identifier hs-var">ccsCallStack</span></a></span><span>
</span><span id="line-444"></span><span>    </span><span class="annot"><span class="annottext">AssertionFailed -&gt; IO a
forall e a. Exception e =&gt; e -&gt; IO a
</span><a href="GHC.IO.html#throwIO"><span class="hs-identifier hs-var">throwIO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; AssertionFailed
</span><a href="GHC.IO.Exception.html#AssertionFailed"><span class="hs-identifier hs-var">AssertionFailed</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Assertion failed\n&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531487"><span class="hs-identifier hs-var">stack</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-445"></span><span>
</span><span id="line-446"></span><span class="annot"><a href="GHC.IO.Exception.html#unsupportedOperation"><span class="hs-identifier hs-type">unsupportedOperation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span>
</span><span id="line-447"></span><span id="unsupportedOperation"><span class="annot"><span class="annottext">unsupportedOperation :: IOException
</span><a href="GHC.IO.Exception.html#unsupportedOperation"><span class="hs-identifier hs-var hs-var">unsupportedOperation</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-448"></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Handle
-&gt; IOErrorType
-&gt; String
-&gt; String
-&gt; Maybe CInt
-&gt; Maybe String
-&gt; IOException
</span><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-var">IOError</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Handle
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#UnsupportedOperation"><span class="hs-identifier hs-var">UnsupportedOperation</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-449"></span><span>        </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Operation is not supported&quot;</span></span><span> </span><span class="annot"><span class="annottext">Maybe CInt
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-450"></span><span>
</span><span id="line-451"></span><span class="hs-comment">{-
(untangle coded message) expects &quot;coded&quot; to be of the form
        &quot;location|details&quot;
It prints
        location message details
-}</span><span>
</span><span id="line-457"></span><span class="annot"><a href="GHC.IO.Exception.html#untangle"><span class="hs-identifier hs-type">untangle</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-458"></span><span id="untangle"><span class="annot"><span class="annottext">untangle :: Addr# -&gt; ShowS
</span><a href="GHC.IO.Exception.html#untangle"><span class="hs-identifier hs-var hs-var">untangle</span></a></span></span><span> </span><span id="local-6989586621679531486"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679531486"><span class="hs-identifier hs-var">coded</span></a></span></span><span> </span><span id="local-6989586621679531485"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531485"><span class="hs-identifier hs-var">message</span></a></span></span><span>
</span><span id="line-459"></span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531484"><span class="hs-identifier hs-var">location</span></a></span><span>
</span><span id="line-460"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;: &quot;</span></span><span>
</span><span id="line-461"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531485"><span class="hs-identifier hs-var">message</span></a></span><span>
</span><span id="line-462"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531483"><span class="hs-identifier hs-var">details</span></a></span><span>
</span><span id="line-463"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n&quot;</span></span><span>
</span><span id="line-464"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-465"></span><span>    </span><span id="local-6989586621679531482"><span class="annot"><span class="annottext">coded_str :: String
</span><a href="#local-6989586621679531482"><span class="hs-identifier hs-var hs-var">coded_str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; String
</span><a href="../../ghc-prim/src/GHC.CString.html#unpackCStringUtf8%23"><span class="hs-identifier hs-var">unpackCStringUtf8#</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679531486"><span class="hs-identifier hs-var">coded</span></a></span><span>
</span><span id="line-466"></span><span>
</span><span id="line-467"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679531484"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531484"><span class="hs-identifier hs-var">location</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679531483"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531483"><span class="hs-identifier hs-var">details</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-468"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; (String, String)
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="GHC.List.html#span"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679531480"><span class="hs-identifier hs-var">not_bar</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531482"><span class="hs-identifier hs-var">coded_str</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679531479"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531479"><span class="hs-identifier hs-var">loc</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679531478"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531478"><span class="hs-identifier hs-var">rest</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-469"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531478"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-470"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'|'</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679531477"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531477"><span class="hs-identifier hs-var">det</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531479"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531477"><span class="hs-identifier hs-var">det</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-471"></span><span>          </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679531479"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-472"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-473"></span><span>    </span><span id="local-6989586621679531480"><span class="annot"><span class="annottext">not_bar :: Char -&gt; Bool
</span><a href="#local-6989586621679531480"><span class="hs-identifier hs-var hs-var">not_bar</span></a></span></span><span> </span><span id="local-6989586621679531475"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679531475"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679531475"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'|'</span></span><span>
</span><span id="line-474"></span><span>
</span><span id="line-475"></span></pre></body></html>